package com.surelution.projects.gard.core

import com.surelution.projects.gard.domain.Department;
import com.surelution.projects.gard.domain.Patrol;
import com.surelution.projects.gard.domain.PatrolClock;
import com.surelution.projects.gard.domain.Poi;

class DepartmentClockPatrolVo {
	
	Department department
	HashMap<Poi, Patrol> patrols

	public DepartmentClockPatrolVo(Department department) {
		patrols = new HashMap<Poi, Patrol>()
		List<Poi> pois = Poi.findAllByDepartment(department)
		if(pois) {
			pois.each {poi->
				if(!patrols[poi]) {
					patrols.add(poi, null)
				}
			}
		}
	}
	
	public void put(Patrol patrol) {
		if(patrol) {
			if(patrols[patrol.poi]) {
				patrols.put(patrol.poi, patrols)
			}
		}
	}
}
